1. Field of the Invention
The present invention relates to a data generating method and related apparatus, and more particularly to a data generating method and related apparatus for increasing preamble information capacity for a quick response code.
2. Description of the Prior Art
A quick response code, also known as QR code, is a two-dimensional barcode that offers high-speed and omni-directional reading and has a large information capacity and high reliability, and also is compatible with diverse characters and image information. With the abovementioned advantages, the QR code is therefore used in industrial management, electronic business and personal information exchanges and many other fields. A user can take a picture for the QR code with a digital camera and thereby retrieve embedded information of the QR code after the picture is identified and decoded by an interpreting software.
The QR code includes several properties. For example, the QR code can be embedded with Japanese characters, encoded by the Shift_JIS standard, or Chinese characters, encoded by the UTF-8 (traditional Chinese) or GB 2312 (Simplified Chinese) standard. The QR code has fifty symbol size versions from 21×21 modules (Version 1) to 217×217 modules (Version 50). The symbol with a higher-numbered version has greater information capacity. A black module represents “1” in binary, whereas a white module represents “0” in binary. The error correction of the QR code has four levels of L, M, Q and H, by which approximate 7%, 15%, 25% and 30% of codewords that can be restored, respectively. Taking a QR code of version 40 with level L for example, the QR code symbol has a maximum data capacity of 7,089 numeric characters, 4,296 alphanumeric characters, 2,953 8-bit characters and 1,817 Chinese/Kanji characters.
Please refer to FIG. 1, which is a schematic diagram of a QR code symbol 10 according to the prior art. For simplicity, the QR code 10 includes position detection patterns 12, 14 and 16, separators 18, 20 and 22, and an information area 24. During interpretation of the QR code symbol 10, the position detection patterns 12, 14 and 16 provide the symbol size and area, and the separators 18, 20 and 22 provide clear margins to separate the position detection patterns 12, 14 and 16 from the information area 24. The information area 24 includes diverse patterns and data, such as an alignment pattern, version and error correction information, and a pattern of embedded data. The detailed specification for the QR code can be referred by a data coding specification 18004 developed by International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC) and therefore the detailed drawing and depiction of the information area 24 are omitted herein.
The specification 18004 does not provide uniform specification for character encoding, and the character encoding format chosen by preference in countries. For example, the Open Mobile Internet Alliance (OMIA) in Taiwan adopts the UTF-8 format, whereas the Shift_JIS format is used in Japan. When the formats for encoding and decoding are different, the decoding result of the QR code is correct if the data of the QR code is simply alphanumeric and numeric characters. However, the decoding result of the QR code becomes unidentifiable if the data of the QR code includes Chinese or Japanese characters. For example, a QR code symbol includes a traditional Chinese data content of “Hello Everybody” encoded based on the UTF-8 format, and the QR code symbol is stamped on a Taiwan product. If the product is shipped to Japan, the QR code of the product is decoded based on the Shift_JIS format so that a decoding result of the “Hello Everybody” becomes unreadable characters.
To solve the abovementioned decoding problem, the user has to obtain information of the encoding format in advance and mutually changes the decoding format used in a decoding apparatus. Thus, the QR code of the prior art results in inconvenience of decoding process for transnational products.